<template>
    <div class="im-srq-topTable">
        <el-table ref="receiveTable" size="mini" border :data="resData" style="width: 100%" height="500" >
            <el-table-column type="index" label="序号" width="50" :show-overflow-tooltip="true"> </el-table-column>
            <el-table-column prop="productCode" label="机型" width="70" :show-overflow-tooltip="true"> </el-table-column>
            <el-table-column prop="batchNo" label="批次" :show-overflow-tooltip="true"> </el-table-column>
            <el-table-column prop="startLotNo" label="起始架次" :show-overflow-tooltip="true" > </el-table-column>
            <el-table-column prop="endLotNo" label="截止架次" :show-overflow-tooltip="true"> </el-table-column>
            <el-table-column prop="qualityCode" label="质量编号" :show-overflow-tooltip="true"> </el-table-column>
            <el-table-column prop="itemCode" label="图号" width="130" :show-overflow-tooltip="true"> </el-table-column>
            <el-table-column prop="billNo" label="退货单号" :show-overflow-tooltip="true"> </el-table-column>
            <el-table-column prop="returnDeliveryShop" label="退货移交单位" width="100" :show-overflow-tooltip="true"> </el-table-column>
            <el-table-column prop="returnReceiveShop" label="退货接收单位" width="100" :show-overflow-tooltip="true"> </el-table-column>
            <el-table-column prop="accordingNo" label=" 退货依据" :show-overflow-tooltip="true"> </el-table-column>
            <el-table-column prop="returnStatus" label="退货状态" :show-overflow-tooltip="true"> </el-table-column>
            <el-table-column prop="applyEmpCode" label="申请人" :show-overflow-tooltip="true"> </el-table-column>
            <el-table-column prop="startTime" label="申请日期(开始)" width="100" :show-overflow-tooltip="true"> </el-table-column>
            <el-table-column prop="endTime" label="申请日期(结束)" width="100" :show-overflow-tooltip="true"> </el-table-column>
        </el-table>
        <!-- 分页 -->
        <el-pagination
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
        :current-page="pageNumber"
        :page-sizes="[10,20,50,100]"
        :page-size="pageSize"
        layout="total, sizes, prev, pager, next, jumper"
        :total="totalCount">
        </el-pagination>
    </div>
</template>
<script>
import { mrMhAll } from "@/utils/api.js";
export default {
    name:"ImSrqTopTable",
    data(){
        return{
             // 当前页数
            pageNumber: 1,
            // 数据总个数
            totalCount: 0,
            // 返回的数据数组
            resData: [],
            // 每页数据个数
            pageSize: 20,
            // 确认列表高亮参数
            stableIndex: 0,
        }
    },
    methods:{
        // 每页个数改变 
        handleSizeChange(val){
            this.pageSize = val
            this.$bus.$emit('imSrqPageSize',this.pageSize)
        },
        // 页数改变
        handleCurrentChange(val) {
            this.pageNumber = val;
            this.$bus.$emit('imSrqPageNumber',this.pageNumber)
        },
    },
    mounted() {
        // 接收TopInput查询到的数据
        this.$bus.$on('ImSrqSearchData',(e)=>{
            this.resData = e.result
            this.totalCount = e.pageParameter.totalCount
        })
  }
}
</script>
<style scoped>
.im-srq-topTable {
    text-align: center;
}
</style>